<template>
  <div>
    <p>案例：</p>
    <button @click="handle('toXSS')">进入XSS攻击案例</button>
    <button @click="handle('toCSRF')">进入CSRF攻击案例</button>
    <button @click="handle('hackJacking')">进入hackJacking攻击案例</button>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },

  methods: {
    handle(path) {
      switch (path) {
        case "toXSS":
          this.$router.push("/demo1");
          break;

        case "toCSRF":
          this.$router.push("/toCSRF");
          break;

        case "hackJacking":
          this.$router.push("/clickJacking");
          break;

        default:
          break;
      }
    },
  },
};
</script>
